import request from '@/utils/request'

export function getPageList(data) {
  return request({
    url: '/sale/page',
    method: 'post',
    data
  })
}

export function saleAdd(id) {
  return request({
    url: '/sale/' + id,
    method: 'post'
  })
}

export function saleDetail(id) {
  return request({
    url: '/sale/' + id,
    method: 'get'
  })
}

export function saleDel(id) {
  return request({
    url: '/sale/' + id,
    method: 'delete'
  })
}

export function jump(data) {
  return request({
    url: '/sale/jump',
    method: 'post',
    data
  })
}

export function saleStep1(data) {
  return request({
    url: '/sale/step1',
    method: 'post',
    data
  })
}

export function saleStep2(data) {
  return request({
    url: '/sale/step2',
    method: 'post',
    data
  })
}

export function saleStep3(data) {
  return request({
    url: '/sale/step3',
    method: 'post',
    data
  })
}

export function saleStep4(data) {
  return request({
    url: '/sale/step4',
    method: 'post',
    data
  })
}

export function saleStep5(data) {
  return request({
    url: '/sale/step5',
    method: 'post',
    data
  })
}

export function saleStep7(data) {
  return request({
    url: '/sale/step7',
    method: 'post',
    data
  })
}

export function sale7BuyerCancel(id) {
  return request({
    url: '/sale/step7/buyerCancel/' + id,
    method: 'post'
  })
}

export function sale7OwnerCancel(id) {
  return request({
    url: '/sale/step7/ownerCancel/' + id,
    method: 'post'
  })
}

export function saleStep8(data) {
  return request({
    url: '/sale/step8',
    method: 'post',
    data
  })
}

export function saleStep9(data) {
  return request({
    url: '/sale/step9',
    method: 'post',
    data
  })
}

export function saleStep6Add(data) {
  return request({
    url: '/sale/step6/addPlan',
    method: 'post',
    data
  })
}

export function sale6Recommend(data) {
  return request({
    url: '/sale/step6/recommend',
    method: 'post',
    data
  })
}

export function sale6cancelPlan(id) {
  return request({
    url: '/sale/step6/cancelPlan/' + id,
    method: 'post'
  })
}

export function sale6BuyerSecondConfirm(id) {
  return request({
    url: '/sale/step6/buyerSecondConfirm/' + id,
    method: 'post'
  })
}

export function sale6BuyerCancel(id) {
  return request({
    url: '/sale/step6/buyerCancel/' + id,
    method: 'post'
  })
}

export function sale6OwnerCancel(id) {
  return request({
    url: '/sale/step6/ownerCancel/' + id,
    method: 'post'
  })
}

export function sale6OwnerRrfused(id) {
  return request({
    url: '/sale/step6/ownerRefused/' + id,
    method: 'post'
  })
}

export function sale6OwnerAgree(id) {
  return request({
    url: '/sale/step6/ownerAgree/' + id,
    method: 'post'
  })
}

export function sale6Result(data) {
  return request({
    url: '/sale/step6/result',
    method: 'post',
    data
  })
}

export function sale6Step6(data) {
  return request({
    url: '/sale/step6',
    method: 'post',
    data
  })
}

export function edit(data) {
  return request({
    url: '/sale',
    method: 'put',
    data
  })
}

export function deduct(id) {
  return request({
    url: '/sale/step2/deduct/' + id,
    method: 'post'
  })
}

export function offlinePay(id) {
  return request({
    url: '/sale/step2/offlinePay/' + id,
    method: 'post'
  })
}
